package cn.imvc.app.models;


import java.util.List;
import java.util.Map;

import org.springframework.data.domain.Page;

import cn.imvc.app.entities.Domain;
import cn.imvc.app.entities.Member;
import cn.imvc.data.domain.ViewRequest;

public interface DomainModel{
	Page<Domain> find(ViewRequest viewRequest);

	Domain get(int id);

	Domain save(Domain entity);

	Domain update(Domain entity);

	void delete(int id);

	void deleteBatch(int[] ids);
	
	Domain findBymemberId(Integer memberId);

	List<Domain> getByDomain(String domain);

	/**
	 * 根据当前登录用户修改domain
	 * 需判断是否存在
	 * @param token
	 * @param domain
	 */
	Map<String, String> updateDomain(Member member, String domain);
	
}